<?php
    $args = array(
        'meta_key' => 'page_faculty',
        'meta_value' => 1,
        'post_type' => 'page',
        'posts_per_page' => 1,
        'suppress_filters'=>0
    );
    $posts_n1 = get_posts($args);
    if(count($posts_n1)):
        $post_n1 = $posts_n1[0];
        $meta_values = is_array(get_field('faculty', $post_n1->ID)) ? get_field('faculty', $post_n1->ID) : array();
?>
<section class="box-faculty animated-area">
    <div class="fix">
        <article class="intro">
            <div class="image">
                <?php $id_c = 0; $s_n = 0.6; foreach($meta_values as $m): ?>
                    <a href="<?php echo (trim($m['detail_trainers']) != '') ? $m['detail_trainers'] : '#'; ?>"><img data-animation="pulse" data-animation-delay="<?php echo $s_n;?>s" data-animation-duration="1s" class="animated" src="<?php echo $m['image']['url']?>" width="140" height="140" alt="<?php $m['fullname']?>"/></a>
                <?php $s_n+=0.3; if($id_c == 5) break;$id_c++;endforeach;?>
            </div>
            <div class="text">
                <h3 data-animation="fade-in-right" data-animation-delay="0.6s" data-animation-duration="1s" class="animated"><?php echo $post_n1->post_title;?></h3>
                <p data-animation="fade-in-right" data-animation-delay="0.9s" data-animation-duration="1s" class="animated"><?php echo $post_n1->post_content;?></p>
                <a data-animation="fade-in-right" data-animation-delay="1.2s" data-animation-duration="1s" href="<?php echo get_permalink($post_n1->ID);?>" title="Xem thêm" class="animated">Xem thêm</a>
            </div>
        </article>
    </div>
</section><!--//box-faculty-->
<?php endif;?>